package priv.pattern.decorator.subclass;

/*
 * 作者：m鹏h
 * 时间；2024/6/25 21:50
 * 描述：
 **/

import priv.pattern.decorator.Coffee;

public class PearlCoffee extends CoffeeDecorator {
    public PearlCoffee(Coffee coffeeToDecorate) {
        super(coffeeToDecorate);
    }

    @Override
    public double getCost() {
        return decoratedCoffee.getCost() + 0.7;
    }

    @Override
    public String getIngredients() {
        return decoratedCoffee.getIngredients() + ", 珍珠";
    }
}